package com.mnsq.category.bean.entity;

import com.mnsq.category.bean.base.BaseEntity;
import lombok.Data;
import lombok.experimental.Accessors;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author 周俭
 */
@Data
@Accessors(chain = true)
@Entity
@Table(name = "c_category")
public class Category extends BaseEntity {
    /**
     * 分类名称
     */
    @Column(name = "cn_name")
    private String name;
    /**
     * 英文名称
     */
    @Column(name = "en_name")
    private String enName;
    /**
     * 分类编码，4，6，8位，以此类推
     */
    private String code;
    /**
     * 类型ID
     */
    @Column(name = "type_id")
    private Long typeId;
    /**
     * 父节点ID
     */
    @Column(name = "p_id")
    private Long pId;
    /**
     * 统一英文
     */
    private String str;
    /**
     * 级别
     */
    private Integer level;
}
